package com.hll.spring.anno;

import com.hll.spring.anno.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author hll
 * @create 2022-05-11 12:26
 */
public class SpringTest {
  private final ApplicationContext context =
      new AnnotationConfigApplicationContext(SpringConfig.class);

  @Test
  public void test1() {
    UserService service = context.getBean("userServiceImpl", UserService.class);
    System.out.println(service);
  }
}
